<!--  -->
<template>
  <div>
    <div class="searchArea">
      <form action="###" class="searchForm">
        <div style="display: inline-block; position: relative;margin-top: 0px;">
          <input type="text" id="autocomplete" class="input-error input-xxlarge" v-model="input" />
          <el-button type="primary" :icon="Search"
            style="width: 24px; height: 24px; cursor: pointer; position: absolute;right: 80px; top: 5px; " />
          <button class="sui-btn btn-xlarge btn-danger" type="button" @click="goSearch" style="">搜索</button>
        </div>
      </form>
    </div>
  </div>
</template>

<script lang="ts">
import { Search } from "@element-plus/icons-vue"
import { defineComponent, reactive, ref } from 'vue'
import { useRouter } from 'vue-router'
import { useStore } from 'vuex'
export default {
  name: 'SearchComponent',
  setup() {
    const store = useStore()
    const router = useRouter()
    const input = ref('')
    const goSearch = () => {
      //
    }
    return {
      input,
      goSearch,
      Search
    }
  }
}
</script>

<style  scoped lang='less'>

.searchArea {
  float: right;

  .searchForm {
    overflow: hidden;

    input {
      box-sizing: border-box;
      width: 490px;
      height: 32px;
      padding: 0 4px;
      border: 2px solid white;
      float: left;
      border-radius: 16px;
      &:focus {
        outline: none;
      }
    }

    button {
      height: 32px;
      width: 68px;
      background-color: #fff;
      border: none;
      color: #0d6efd;
      cursor: pointer;
      margin-left: 5px;
      border-radius: 16px;
      &:focus {
        outline: none;
      }
    }
  }
}
</style>
